import java.util.Scanner;

public class Training09 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        double sum=0;
        double ave;
        System.out.println("请输入班级人数");
        Scanner ke=new Scanner(System.in);
        int hj= ke.nextInt();
        double[] score=new double[hj];
        for (int i=0; i< hj;i++){
            System.out.println("请输入学号是"+(i+1)+"学生的成绩");
            score[i]= sc.nextDouble();
            sum=sum+score[i];
        }
        ave=sum/hj;
        System.out.println("学生的平均成绩是："+ave);
        int a=0;
        int B=0;
        int C=0;
        int D=0;
        for (int i = 0; i < score.length; i++) {

            if (score[i]>=80){
                a++;
            } else if (score[i]>=70){
                B++;

        }else if (score[i]>=60) {
                C++;
            }else if (score[i]<=60){
            D++;
            }else {
                System.out.println("第"+(i+1)+"成绩格式错误");
            }
        }
        System.out.println("成绩大于80："+a);
        System.out.println("成绩大于70："+B);
        System.out.println("成绩大于60："+C);
        System.out.println("成绩不及格60："+D);
    }
}
